$dateWidth: 220px;
$baseColor: #B1D2EC;
$weekColor: #163A58;
$dayColor: #1F547E;
$otherDayColor: #60A2D7;

$hoverColor: #ECF4FB;

$optColor: #ECF4FB;

.ui-datepicker-wrapper {

  width: $dateWidth;
  font-size: 16px;
  border: 1px solid $baseColor;
  //box-shadow: 2px 2px 8px 2px rgba(128,128,128,.3);
  display: none;
  position: absolute;
  font: 12px '\5B8B\4F53';
  background-color: #fff;

  .ui-datepicker-header {
    padding: 5px;
    padding-bottom: 0px;
    height: 24px;
    text-align: center;
    font-weight: bold;
    font: 12px '\5B8B\4F53';

    .ui-datepicker_ym {
      position: relative;
      float: left;
      height: 24px;
      cursor: pointer;
      border: 1px solid #B1D2EC;

      .ui-datepicker_choose {
        background-color: #DEECF8;
        display: block;
        float: left;
        position: relative;
        width: 20px;
        height: 24px;

        cite {
          position: absolute;
          width: 0;
          height: 0;
          border-width: 5px;
          border-style: dashed;
          border-color: transparent;
          overflow: hidden;
          cursor: pointer;
          left: 50%;
          top: 50%;
        }
      }

      .ui-datepicker_chprev {
        border-left: none;
        border-right: 1px solid #B1D2EC;
        color: #1F547E;

        cite {
          border-right-style: solid;
          border-right-color: #3081C2;
          margin: -5px 0 0 -7px;
        }
      }

      .ui-datepicker_chnext {

        cite {
          border-left-style: solid;
          border-left-color: #3081C2;
          margin: -5px 0 0 -2px;
        }
      }

      .ui-datepicker_chnext {
        float: right;
        border-left: 1px solid #B1D2EC;
      }

      label {
        position: absolute;
        width: 0;
        height: 0;
        border-width: 5px;
        border-style: dashed;
        border-color: transparent;
        overflow: hidden;
        cursor: pointer;
        top: 50%;
        margin: -2px 0 0 -5px;
        border-top-style: solid;
        border-top-color: #3081C2;
        right: 28px;
      }

    }

    .ui-datepicker_y,.ui-datepicker_m {
      position: relative;

      input {
        float: left;
        display: block;
        text-align: center;
        border: none;
        cursor: pointer;
        color: #1F547E;
        font: 12px '\5B8B\4F53';
        //padding: 5px 12px 5px 3px;
        padding: 0px 12px 0px 3px;
        height: 24px;
        line-height: 24px;
      }
    }

    $ymWidth: 7px;
    $ymRight: 16px;

    .ui-datepicker_y {
      width: $dateWidth / 2 - 8px + $ymWidth;
      input {
        width: $dateWidth / 2 - 7px - 45px - $ymRight + $ymWidth;
      }

      .ui-datepicker_tab {
        display: block;
        width: 100%;
        height: 20px;
        background-color: #DEECF8;
        position: relative;

        cite {
          position: absolute;
          width: 0;
          height: 0;
          border-width: 5px;
          border-style: dashed;
          border-color: transparent;
          overflow: hidden;
          cursor: pointer;
          left: 50%;
          top: 50%;

        }
      }

      .ui-datepicker_chtop {
        border-bottom: 1px solid $baseColor;

        cite {
          border-bottom-color: #3081C2;
          margin: -7px 0 0 -5px;
          border-bottom-style: solid;
        }
      }

      .ui-datepicker_chdown {
        border-top: 1px solid $baseColor;
        cite {
          border-top-color: #3081C2;
          margin: -2px 0 0 -5px;
          border-top-style: solid;
        }
      }

      .ui-datepicker_ys {
        width: $dateWidth / 2 - 8px + $ymWidth;
        position: absolute;
        top: 24px;
        left: -1px;
        border: 1px solid $baseColor;

        ul {
          list-style: none;
          background-color: #fff;
          margin: 0;
          padding: 0;

          li {
            display: inline-block;
            width: ($dateWidth / 2 - 8px + $ymWidth) / 2 - 3px;
            height: 20px;
            line-height: 20px;
            color: #1F547E;

            &:hover {
              background-color: #ECF4FB;
            }
          }
        }

      }
    }

    .ui-datepicker_ys,.ui-datepicker_ms {
      display: none;
    }

    .ui-datepicker_m {
      width: $dateWidth / 2 - 9px - $ymWidth;
      float: right;
      input {
        width: $dateWidth / 2 - 7px - 45px - $ymRight - $ymWidth;
      }

      .ui-datepicker_ms {
        width: $dateWidth / 2 - 9px - $ymWidth - 20px;
        position: absolute;
        top: 24px;
        left: -1px;
        border: 1px solid $baseColor;
        background-color: #fff;
        padding: 5px 10px;

        span {
          display: inline-block;
          width: ($dateWidth / 2 - 9px - $ymWidth) / 2 - 13px;
          height: 20px;
          line-height: 20px;
          color: #1F547E;

          &:hover {
            background-color: #ECF4FB;
          }
        }
      }
    }

    .ui-datepicker-btn {
      font-family: serif;
      font-size: 20px;
      width: 20px;
      height: 50px;
      line-height: 50px;
      color: $baseColor;
      text-align: center;
      cursor: pointer;
      text-decoration: none;
    }

    .ui-datepicker-prev-btn {
      float: left;
    }

    .ui-datepicker-next-btn {
      float: right;
    }

  }

  .ui-datepicker-body{

    font: 12px '\5B8B\4F53';

     table {
       width: $dateWidth - 10px;
       border-collapse: collapse;
       margin: 5px;
       border: 1px solid $baseColor;


       thead {
         background-color: #DEECF8;
         color: $weekColor;
       }

       tbody {
         color: $dayColor;
         font-size: 12px;
       }

       th,td {
         height: 20px;
         text-align: center;
         font: 12px '\5B8B\4F53';
       }

       th {
         font-size: 12px;
         height: 20px;
         font-weight: normal;
       }

       td {
         border: 1px solid $baseColor;
       }

       .edik-datepicker-day {
         cursor: pointer;
         &:hover {
           background-color: $hoverColor;
         }
       }

       .edik-datepicker-week {
         background-color: #DEECF8;
       }

       .edik-datepicker-other-day {
         color: $otherDayColor;
       }

       .edik-datepicker-this-day {
         background-color: #DEECF8 !important;
       }

     }

 }

  .ui-datepicker-footer {
    width: $dateWidth - 10px;
    height: 21px;
    padding: 5px;
    padding-top: 0px;

    .ui-datepicker-footerbtn {
      float: right;
      border-right: 1px solid $baseColor;

      a {
        display: inline-block;
        border: 1px solid $baseColor;
        border-right: none;
        line-height: 20px;
        text-decoration: none;
        font: 12px '\5B8B\4F53';
        color: $dayColor;
        padding: 3px 5px;
        background-color: $optColor;

        &:hover {
          background-color: #FFF;
        }
      }
    }
  }

}

.ui-datepicker-wrapper-show {
  display: block !important;
}

.edik-datepicker-hide {
  display: none;
}